package com.sumainfor.pc.epc.controller;

import com.sumainfor.common.util.JsonResult;
import com.sumainfor.pc.epc.service.DecoratedBeingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

@RestController
@RequestMapping("/DecoratedBeingContrcoller")
public class DecoratedBeingContrcoller {

    @Autowired
    DecoratedBeingService decoratedBeingService;

    /**
     * 按条件批次id 和房源装修状态查询房源
     * @param params
     * @return
     */
    @ResponseBody
    @RequestMapping("getDecoratePlanInfo")
    public JsonResult getDecoratePlanInfo(@RequestParam Map<String,Object> params){
        return  decoratedBeingService.getDecoratePlanInfo(params);
    }


    /**
     * 按条件批次id 和房源装修状态查询房源
     * @param params
     * @return
     */
    @ResponseBody
    @RequestMapping("movement")
    public void movement(@RequestParam Map<String,Object> params){

        decoratedBeingService.movement(params);
    }
    /**
     * 服务管家验房通过后修改状态为验房已经完成
     */
    @PostMapping("/key/updateIfCheckStateaHo")
    public JsonResult updateIfCheckStateaHo(@RequestBody Map<String,Object> params){
        return decoratedBeingService.updateIfCheck(params);
    }
}
